package com.yudaob2b.backend.controller.elong;

import com.alibaba.fastjson.JSONObject;
import com.aliyun.oss.common.utils.HttpUtil;
import com.yudaob2b.common.utils.HttpUtils;
import com.yudaob2b.common.utils.XmlUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 *
 *
 * @author Kidd.Tan
 * @email 298023780@qq.com
 * @date 7/4/18 11:11 PM
 */
@RestController
@RequestMapping("/api/static")
public class ApiStaticController {

    //静态信息域名
    /*@Value("${elong.static.host.url}")
    private String ELONG_STATIC_HOST_URL;*/

    @RequestMapping("/hotellist")
    public String hotellist() {
        /*String url = "http://"+ELONG_STATIC_HOST_URL+"/xml/v2.0/hotel/hotellist.xml";
        String result = HttpUtils.get(url,true);
        System.out.println(result);
        Map<String, String> map = XmlUtils.returnXMLData(result,"Hotel");
        System.out.println(JSONObject.toJSONString(map));*/
        return "ok";
    }
}
